!!Tutorial 4: Creating bitmaps

In this tutorial we will demonstrate how to create procedural bitmap graphics in ZGameEditor.

There is three different ways of constructing bitmaps:
* "Painting" using BitmapRect component
* Defining a mathematical expression using the BitmapExpression component
* Importing a texture from a external file

!!!! Using BitmapRect 

First lets create a blank bitmap. This is needed for all the examples.

*Start ZGameEditor.
*To start a new project: Select File - New project.

*Add (Ctrl-A) a Bitmap-component to the '''Content''' list property.

Use the "Lock preview" function to lock the preview window to the bitmap so it keeps displaying a preview as we make changes. Either right-click the component and select "Lock preview" or click the lock-icon in the toolbar.

Now expand the Bitmap tree node to expose the '''Producers''' list property. This is a list of component that is used to generate (or produce) the bitmap.

*Add a '''BitmapRect'''-component to the Producers tree node.

You should now see something like this:

Path:/images/tut4/pic1.png

The default behaviour for the bitmap-rectangle component is to simply display a gray centered rectangle.

Now try changing the values in the Size-property, and also change the Color property by clicking on the color. 

Path:/images/tut4/pic2.png

The preview window displays the effect of changing property values.

By combining several BitmapRects-component after each other it is possible to make simple patterns.

Path:/images/tut4/pic3.png

With the BitmapZoomRotate-component you can zoom in or out on a bitmap and rotate it, like this:

Path:/images/tut4/pic4.png

